<template>
  <div>
  </div>
</template>

<script>
  // document.addEventListener('UniAppJSBridgeReady', function() {  
  //   uni.getEnv(function(res) {  
  //     console.log('当前环境：' + JSON.stringify(res));  
  //   });  
  // });

export default {
  name: 'WXPay',
  props: {},
  components: {

  },
  data() {
    return {
      result: ''
    }
  },
  computed: {},
  watch: {},
  methods: {
    go_home() {
      uni.switchTab({
        url: '/pages/index/index'
      })
    },

		go_order() {
      wx.miniProgram.redirectTo({
        url: '/pagesFenBao/pages/gatherPay/gatherPay?' + this.result
      })
    }
  },
  created() {
    let paySign = JSON.parse(this.$route.query.paySign)
    let list = []
    for (var key in paySign) {
      let value = encodeURIComponent(paySign[key])
      let item = key + "=" + value
      list.push(item)
    }
    this.result = list.join("&")
    wx.miniProgram.redirectTo({
      url: '/pagesFenBao/pages/gatherPay/gatherPay?' + this.result
    })
  },
  mounted() {
    
  },
  beforeCreate() {},
  beforeMount() {},
  beforeUpdate() {},
  updated() {},
  beforeDestroy() {},
  destroyed() {},
  activated() {},
}
</script>

<style lang='scss' scoped>
  
</style>